3.156 \(\int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx\)

Optimal. Leaf size=64 \[ -\frac {a \cot ^3(e+f x)}{3 f}-\frac {a \cot (e+f x)}{f}-\frac {b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {b \cot (e+f x) \csc (e+f x)}{2 f} \]

[Out]

-1/2*b*arctanh(cos(f*x+e))/f-a*cot(f*x+e)/f-1/3*a*cot(f*x+e)^3/f-1/2*b*cot(f*x+e)*csc(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2748, 3767, 3768, 3770} \[ -\frac {a \cot ^3(e+f x)}{3 f}-\frac {a \cot (e+f x)}{f}-\frac {b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {b \cot (e+f x) \csc (e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^4*(a + b*Sin[e + f*x]),x]

[Out]

-(b*ArcTanh[Cos[e + f*x]])/(2*f) - (a*Cot[e + f*x])/f - (a*Cot[e + f*x]^3)/(3*f) - (b*Cot[e + f*x]*Csc[e + f*x
])/(2*f)

Rule 2748

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx &=a \int \csc ^4(e+f x) \, dx+b \int \csc ^3(e+f x) \, dx\\ &=-\frac {b \cot (e+f x) \csc (e+f x)}{2 f}+\frac {1}{2} b \int \csc (e+f x) \, dx-\frac {a \operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (e+f x)\right )}{f}\\ &=-\frac {b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a \cot (e+f x)}{f}-\frac {a \cot ^3(e+f x)}{3 f}-\frac {b \cot (e+f x) \csc (e+f x)}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 115, normalized size = 1.80 \[ -\frac {2 a \cot (e+f x)}{3 f}-\frac {a \cot (e+f x) \csc ^2(e+f x)}{3 f}-\frac {b \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {b \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}-\frac {b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^4*(a + b*Sin[e + f*x]),x]

[Out]

(-2*a*Cot[e + f*x])/(3*f) - (b*Csc[(e + f*x)/2]^2)/(8*f) - (a*Cot[e + f*x]*Csc[e + f*x]^2)/(3*f) - (b*Log[Cos[
(e + f*x)/2]])/(2*f) + (b*Log[Sin[(e + f*x)/2]])/(2*f) + (b*Sec[(e + f*x)/2]^2)/(8*f)

________________________________________________________________________________________

fricas [B]  time = 0.51, size = 128, normalized size = 2.00 \[ -\frac {8 \, a \cos \left (f x + e\right )^{3} - 6 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, {\left (b \cos \left (f x + e\right )^{2} - b\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 3 \, {\left (b \cos \left (f x + e\right )^{2} - b\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 12 \, a \cos \left (f x + e\right )}{12 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )} \sin \left (f x + e\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(a+b*sin(f*x+e)),x, algorithm="fricas")

[Out]

-1/12*(8*a*cos(f*x + e)^3 - 6*b*cos(f*x + e)*sin(f*x + e) + 3*(b*cos(f*x + e)^2 - b)*log(1/2*cos(f*x + e) + 1/
2)*sin(f*x + e) - 3*(b*cos(f*x + e)^2 - b)*log(-1/2*cos(f*x + e) + 1/2)*sin(f*x + e) - 12*a*cos(f*x + e))/((f*
cos(f*x + e)^2 - f)*sin(f*x + e))

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(a+b*sin(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)2/f*((256/3*tan((f*x+exp(1))/2)^3*a+256*tan((f*x+exp(1))/2)^2*b+768*tan((f*x+exp(1))/2)*a)/4096+(-22*tan((
f*x+exp(1))/2)^3*b-9*tan((f*x+exp(1))/2)^2*a-3*tan((f*x+exp(1))/2)*b-a)*1/48/tan((f*x+exp(1))/2)^3+b/4*ln(abs(
tan((f*x+exp(1))/2))))

________________________________________________________________________________________

maple [A]  time = 0.34, size = 74, normalized size = 1.16 \[ -\frac {2 a \cot \left (f x +e \right )}{3 f}-\frac {a \cot \left (f x +e \right ) \left (\csc ^{2}\left (f x +e \right )\right )}{3 f}-\frac {b \cot \left (f x +e \right ) \csc \left (f x +e \right )}{2 f}+\frac {b \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^4*(a+b*sin(f*x+e)),x)

[Out]

-2/3*a*cot(f*x+e)/f-1/3/f*a*cot(f*x+e)*csc(f*x+e)^2-1/2*b*cot(f*x+e)*csc(f*x+e)/f+1/2/f*b*ln(csc(f*x+e)-cot(f*
x+e))

________________________________________________________________________________________

maxima [A]  time = 0.30, size = 73, normalized size = 1.14 \[ \frac {3 \, b {\left (\frac {2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac {4 \, {\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a}{\tan \left (f x + e\right )^{3}}}{12 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(a+b*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/12*(3*b*(2*cos(f*x + e)/(cos(f*x + e)^2 - 1) - log(cos(f*x + e) + 1) + log(cos(f*x + e) - 1)) - 4*(3*tan(f*x
 + e)^2 + 1)*a/tan(f*x + e)^3)/f

________________________________________________________________________________________

mupad [B]  time = 6.74, size = 111, normalized size = 1.73 \[ \frac {3\,a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{8\,f}+\frac {a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{24\,f}+\frac {b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f}+\frac {b\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{2\,f}-\frac {{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+\frac {a}{3}\right )}{8\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(e + f*x))/sin(e + f*x)^4,x)

[Out]

(3*a*tan(e/2 + (f*x)/2))/(8*f) + (a*tan(e/2 + (f*x)/2)^3)/(24*f) + (b*tan(e/2 + (f*x)/2)^2)/(8*f) + (b*log(tan
(e/2 + (f*x)/2)))/(2*f) - (cot(e/2 + (f*x)/2)^3*(a/3 + b*tan(e/2 + (f*x)/2) + 3*a*tan(e/2 + (f*x)/2)^2))/(8*f)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (e + f x \right )}\right ) \csc ^{4}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**4*(a+b*sin(f*x+e)),x)

[Out]

Integral((a + b*sin(e + f*x))*csc(e + f*x)**4, x)

________________________________________________________________________________________